﻿<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>奋青网-后台管理系统</title>
<style type="text/css">
	a{text-decoration:none ;}
</style>
<link href="css/Back.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/Jquery-1-5-2.js"></script>
<script type="text/javascript" src="js/Admin.js"></script>
<script type="text/javascript">
	<!--
		function del(cid,type){
			if(confirm("你确定要删除吗?删除之后不可恢复!")){
				path='${applicationScope.path }/admin/BackReply?action=del&id='+cid+'&type='+type;
				$.ajax({
					type:"Post",
					url:path ,
					dataType:"text" ,
					async:false ,
					success:function(){
						
					} ,
					error:function(){
						alert("失败");
					}
				});
			}
		}
	-->
</script>
</head>
<body>
<p class="Back_Title">查看问题回复</p>
<div class="Title_Line"></div>
<div class="Back_Dashed_Box">
<p>回复问题数量总计：<span class="Orange_Font">${requestScope.num }条</span></p>
</div>
<form>
<table class="Back_List" align="left" width="95%" cellspacing="0">
<tr><th width="30"><input type="checkbox"/></th>
<th width="32">ID</th>
  <th>标题</th>
  <th>类型</th>
  <th>发表人</th>
  <th>赞同数</th>
  <th>反对数</th>
  <th>发布日期</th>
  <th width="100">操作</th></tr>
<c:forEach items="${requestScope.reply}" var="reply" begin="${requestScope.start}" end="${requestScope.end}">
<tr><td><input type="checkbox"/></td><td>${reply.wid }</td><td><a href="${applicationScope.path }/Post?pid=${reply.wpid }">${reply.ptitle }</a></td>
  <td><font color="green">问题</font></td>
  <td>${reply.uname }</td>
  <td>${reply.wagree }</td>
  <td>${reply.wdisagree }</td>
  <td>${reply.date2 }</td>
  <td><a href="#" onclick="del(${reply.wid },'answer');" class="Back_List_Delete"><img src="images/delete.jpg" title="删除" /></a></td></tr>
</c:forEach>
<c:if test="${empty requestScope.reply}">
 <tr><td colspan="3"><b>暂无相关内容</b></td></tr>
</c:if>
</table>
    <div class="Pages">
        <a href="?action=${requestScope.action}&page=1" class="Pages_a">首  页</a>
    	<c:choose>
        	<c:when test="${requestScope.page>1 }">
        		<a href="?action=${requestScope.action}&page=${requestScope.page -1 }" class="Pages_a">上一页</a>
        	</c:when>
        	<c:otherwise>
				<a class="Pages_a">上一页</a>        	
        	</c:otherwise>
        </c:choose>
    	<c:forEach items="${requestScope.count}" var="page">
        </c:forEach>
        <c:choose>
        <c:when test="${requestScope.page+1>requestScope.csize}">
        <a class="Pages_a">下一页</a>
        <a href="?action=${requestScope.action}&page=${requestScope.csize }" class="Pages_a">末页</a>
        </c:when>
        	<c:otherwise>
        		<a href="?action=${requestScope.action}&page=${requestScope.page +1 }" class="Pages_a">下一页</a>
        		<a href="?action=${requestScope.action}&page=${requestScope.csize }" class="Pages_a">末页</a>
        	</c:otherwise>
        </c:choose>
    </div>
</form>
</body>
</html>
